package my.headfirstjava.strategy.v3;


import my.headfirstjava.strategy.v3.behavior.FlyBehavior;
import my.headfirstjava.strategy.v3.behavior.QuackBehavior;

public abstract class Duck {

     FlyBehavior flyBehavior;

     QuackBehavior quackBehavior;


     public void  performFly(){
          flyBehavior.fly();
     }

     public void  performQuack(){
          quackBehavior.quack();
     }

     public abstract void display();

     public FlyBehavior getFlyBehavior() {
          return flyBehavior;
     }

     public void setFlyBehavior(FlyBehavior flyBehavior) {
          this.flyBehavior = flyBehavior;
     }

     public QuackBehavior getQuackBehavior() {
          return quackBehavior;
     }

     public void setQuackBehavior(QuackBehavior quackBehavior) {
          this.quackBehavior = quackBehavior;
     }
}
